package StudyCode.summary.zipfile;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class WriteByteToFileUsingDataInputStream {
	public static void main(String[] args) {
		String strFilePath = "E:/Copy/2.txt";

		try {
			FileOutputStream fos = new FileOutputStream(strFilePath);
			DataOutputStream dos = new DataOutputStream(fos);
			int i = 1;
			dos.writeByte(i);
			dos.close();
			System.out.println("字节写入成功");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
